<template>
	<view class="container">
		<image src="https://yunxingzhan.oss-cn-hangzhou.aliyuncs.com/2.jpg" class="banner" mode="widthFix"></image>
		
		<view class="tip">您可以通过微信发送给好友，好友确认收货地址，您支付订单后即可发货！</view>
		<button class="send" open-type="share">送礼给好友</button>
		<view class="myGift" @click="toMyGift">我的送礼</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				gift_no:''
			}
		},
		onLoad(option) {
			this.gift_no = option.gift_no
		},
		onShareAppMessage(res) {
			let gift_no = this.gift_no
			let app = this
			let spread_code = uni.getStorageSync("gift_spread_code")
			let gift_message = uni.getStorageSync("gift_message")
			return {
				title: gift_message,
				path: `/goods/gift?gift_no=${gift_no}&spread_code=${spread_code}`,
				imageUrl: "https://yunxingzhan.oss-cn-hangzhou.aliyuncs.com/1.jpg",
				success(res) {},
				fail(res) {}
			}
		},
		methods: {
			toMyGift(){
				uni.navigateTo({
				  url: '/goods/giftOrder'
				});
			}
		}
	}
</script>

<style>
	.banner{
		width: 100%;
		height: auto;
	}
	.tip{
		width: 600rpx;
		margin: 0 auto;
		margin-top: 60rpx;
	}
.send{
	background-color: #20cbd4;
	color: #FFFFFF;
	text-align: center;
	height: 70rpx;
	width: 600rpx;
	line-height: 70rpx;
	margin: 50rpx auto;
	border-radius: 0;
	font-size: 26rpx;
}
.send::after{
	display: none;
}
.myGift{
	text-align: center;
	color: #20cbd4;
}
</style>
